        <script>
        
function getdistrict(obj,obj2,proid,disid)
{

      var str="<option value=\"0\">"+$(obj+' option:eq(0)').text()+"</option>";
      var str2="<option value=\"0\">"+$(obj2+' option:eq(0)').text()+"</option>";  
      var selected="";
      
      if(proid!=0)
      {
      var xmlRequest=   $.get(serviceinfo+'getdistrict', { proid:proid }, function(data) {  
         
          if(data.error.response)
         {
          alertbox(data.error.error);
         
         }else
         {
         $.each(data['data'], function(key, value) {
           
            //alert(index + ': ' + value);
             selected="";
            if(key==disid)
            {
            selected=' selected="selected" ';
            }
            
             str+="<option "+selected+" value="+key+">"+value+"</option>"; 

            
         
         });
         
         $(obj).html(str);
         $(obj2).html(str2);
         
         
         
         
         }
      
      });
      
      return xmlRequest;
      }else
      {
      $(obj).html(str);
      $(obj2).html(str2);
      }

}
function gettumbon(obj,disid,tumid)
{

      var selected="";
      var strdata="<option value=\"0\">"+$(obj+' option:eq(0)').text()+"</option>"; 
      if(disid!=0)
      {
      $.get(serviceinfo+'gettumbon', { disid:disid }, function(data) {  
         
          if(data.error.response)
         {
          alertbox(data.error.error);
         
         }else
         {
         $.each(data['data'], function(key, value) {
           
            //alert(index + ': ' + value);
             selected="";
            if(key==tumid)
            {
            selected=' selected="selected" ';
            }
            
             strdata+="<option "+selected+" value="+key+">"+value+"</option>"; 

            
         
         });
         
        // console.log(obj);
         $(obj).html(strdata);
         
         
         
         
         }
      
      });
      }else
      {
      $(obj).html(str);
      }

}
function getprovince(obj,proid)
{

      var str="<option value=\"0\">"+$(obj+' option:eq(0)').text()+"</option>";
    //  var str2="<option value=\"0\">"+$(obj2+' option:eq(0)').text()+"</option>";  
      var selected="";
      
    
      var xmlRequest=   $.get(serviceinfo+'getprovince',{noswap:1}, function(data) {  
         
          if(data.error.response)
         {
          alertbox(data.error.error);
         
         }else
         {
         $.each(data['data'], function(key, value) {
           
            //alert(index + ': ' + value);
             selected="";
            if(proid)
            {
            if(key==proid)
            {
            selected=' selected="selected" ';
            }
            }
            
             str+="<option "+selected+" value="+key+">"+value+"</option>"; 

            
         
         });
         
         $(obj).html(str);
       //  $(obj2).html(str2);
         
         
         
         
         }
      
      });
      
      return xmlRequest;
     

}
function openregisteruser()
{
        
        
        $('.wrprPopRgt').fadeIn("fast");
}
        
function saveregistermember()
{

var arraydata={};
if($('#imgmid-1').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose Photo');
$('.micPopPOS.micWrn').fadeIn("fast");

return false;
}

arraydata['imgmid']=$('#imgmid-1').val();
arraydata['simgmid']=$('#imgmid-1').val();

if($('#re-username').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Input Username');
$('.micPopPOS.micWrn').fadeIn("fast");
$('#re-username').focus();

return false;
}

arraydata['username']=$('#re-username').val();

if($('#re-tel').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Input Tel');
$('.micPopPOS.micWrn').fadeIn("fast");
$('#re-tel').focus();

return false;
}

arraydata['phone']=$('#re-tel').val();

if($('#re-email').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Input Email');
$('.micPopPOS.micWrn').fadeIn("fast");
$('#re-email').focus();

return false;
}

arraydata['email']=$('#re-email').val();

if($('#re-birthday').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Input Email');
$('.micPopPOS.micWrn').fadeIn("fast");
$('#re-birthday').focus();

return false;
}

arraydata['birthdate']=$('#re-birthday').val();

if($('#re-proid').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose Province');
$('.micPopPOS.micWrn').fadeIn("fast");


return false;
}

arraydata['proid']=$('#re-proid').val();

if($('#re-disid').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose District');
$('.micPopPOS.micWrn').fadeIn("fast");


return false;
}

arraydata['disid']=$('#re-disid').val();

if($('#re-tumid').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose Tumbon');
$('.micPopPOS.micWrn').fadeIn("fast");


return false;
}

arraydata['tumid']=$('#re-tumid').val();


if($('#re-address').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose Address');
$('.micPopPOS.micWrn').fadeIn("fast");
$('#re-address').focus();

return false;
}

arraydata['address']=$('#re-address').val();


if($('#re-lat').val()=='')
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose Map');


return false;
}



arraydata['lat']=$('#re-lat').val();
arraydata['lng']=$('#re-lng').val();


if($('.wrprPopRgt .ansq1.qstTg').length==0)
{
$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose Gender');
$('.micPopPOS.micWrn').fadeIn("fast");
return false;
}

if($('.wrprPopRgt .ansq2.qstTg').length==0)
{
$('.micPopPOS.micWrn .clTxtPOSW.fs11').html('Please Choose Age');
$('.micPopPOS.micWrn').fadeIn("fast");
return false;
}


arraydata['gender']=$('.wrprPopRgt .ansq1.qstTg').attr('title');
arraydata['age']=$('.wrprPopRgt .ansq2.qstTg').attr('title');

$.post(serviceinfo+'savenewregister', arraydata, function(data) { 
if(data.error.response)
{

$('.micPopPOS.micWrn .clTxtPOSW.fs11').html(data.error.error[0]);
$('.micPopPOS.micWrn').fadeIn("fast");
return false;


}else
{
   
tempurserid=data.userid;
userlist[data.userid]=data.data;
userid=data.userid;
savedatamembertemp();

$('.wrprPopRgt').fadeOut();



}

});





}

        

        
      
        </script>
      
      
        <?
        
  if(is_file(templatepath.'/pos/script'.$data['file'].'.php')&&count($data['user'])!=0&&$data['user']['roleid']>=3)
{
include(templatepath.'/pos/script'.$data['file'].'.php');  
}
        
        ?>
        

        <script src="/templates/template1/pos/js/uidf.js"></script>
    </body>
</html>
